package com.example.demo.service;

import com.example.demo.entity.Menu;
import com.example.demo.entity.Role;
import com.example.demo.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.demo.entity.dto.GiveRolesDto;
import com.example.demo.entity.dto.LoginDto;
import com.example.demo.entity.dto.PageDto;
import com.example.demo.entity.vo.LoginVo;
import com.example.demo.entity.vo.PageVo;
import com.example.demo.entity.vo.PicCaptchaVo;
import jakarta.servlet.http.HttpServletRequest;

import java.io.UnsupportedEncodingException;
import java.util.List;

/**
* @author lw
* @description 针对表【user(用户表)】的数据库操作Service
* @createDate 2023-12-26 15:32:21
*/
public interface UserService extends IService<User> {

    User getUserByName(String name);

    PicCaptchaVo getPicCaptcha();

    LoginVo loginByAccount(LoginDto loginDto, HttpServletRequest request);

    Boolean getShortMessageCaptcha(String phone);

    LoginVo loginByPhone(LoginDto loginDto,String openid ,HttpServletRequest request);

    LoginVo loginByWxScan(String code,HttpServletRequest request);

    LoginVo wxBindToUserAndLogin(LoginDto loginDto,HttpServletRequest request);

    void logout(String token);

    List<User> getList(User user);

    PageVo<User> getPage(PageDto<User> pageDto);

    Boolean giveRoles(GiveRolesDto giveRolesDto);
    
    List<Role> getRolesInfo(Long uid);

    List<Menu> getMenusInfo(Long uid);
}
